package com.lsq.tucao.user.controller;

import com.lsq.tucao.user.pojo.po.User;
import com.lsq.tucao.user.response.JsonResult;
import com.lsq.tucao.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author linshouqiang
 * @Description 注册接口
 * @Date 2020/11/13 11:12
 * @Version 1.0
 */
@RestController
public class RegisterController {

    @Autowired
    private UserService userService;

    @PostMapping("/register")
    public JsonResult register(@RequestBody User user) {

        JsonResult jsonResult = userService.registerUser(user);
        return jsonResult;
    }


}
